<template>
	<view class="container ptb_8 plr_16">
		<view class="height_148 ptb_18 box plr_16 br_8 fc_fff"
			style="background: #303133;">
			<view>
				<view>
					红包总金额
				</view>
				<view class="mt_2 fz_20 fb redpacket-jb-text">
					{{((dataInfo.custom||0)+(dataInfo.share||0)).toFixed(2)}}金豆
				</view>
				<view class="mt_19 fz_12 fx">
					<view class="fx_1 flow_h">
						<view>
							历史抢红包金额
						</view>
						<view class="mt_2 fz_16 fb redpacket-jb-text">
							{{dataInfo.custom||0}}金豆
						</view>
					</view>
					<view class="fx_1 flow_h">
						<view>
							历史共享红包金额
						</view>
						<view class="mt_2 fz_16 fb redpacket-jb-text">
							{{dataInfo.share||0}}金豆
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="mt_12 br_8 bc_fff fc_666">
			<navigator url="/pages/person/pages/record?type=redpacketCustom" hover-class="none" class="p_12 fx aic jcb">
				获得红包记录
				<u-icon name="arrow-right" color="#ccc" size="32rpx"></u-icon>
			</navigator>
			<navigator url="/pages/person/pages/record?type=redpacketShare" hover-class="none" class="p_12 fx aic jcb">
				共享红包记录
				<u-icon name="arrow-right" color="#ccc" size="32rpx"></u-icon>
			</navigator>
		</view>
	</view>
</template>

<script>
	import api from '@/service/config/api.js'
	export default {
		data() {
			return {
				dataInfo: {},
			}
		},
		onShow() {
			this.getData()
		},
		methods: {
			getData() {
				this.$utils.loading()
				api.get('/marketing/web/api/backstage/red_packet/record/my/count').then(res => {
					this.dataInfo = res.data
				})
			}
		},
	}
</script>

<style lang="scss">
	.container {}
</style>